<iframe th:replace="common/top.html" width="100%" frameborder="0" scrolling="yes" class="x-iframe"></iframe>
<link rel="StyleSheet" href="css/category.css" type="text/css" media="screen"/>
<div id="Category2">

    <table>
        <tr>
            <th>Product ID</th>
            <th>Name</th>
            <th>description</th>
            <th></th>
            <th colspan="2"><a th:href="@{/category2/addproduct(catid=${param.catid[0]})}">新增商品</a></th>
        </tr>

        <tr th:each="product:${productList}">
            <td th:text="${product.productId}" id="productId"></td>
            <td th:text="${product.name}" id="productName"></td>
            <td th:utext="${product.description}"></td>
            <td><a th:href="@{/catalog/product(productId=${product.productId})}">详情</a></td>
            <td><a th:href="@{/category2/editeView(productId=${product.productId})}">修改信息</a></td>
            <td><a th:href="@{/category2/delete(name=${product.name})}">删除</a></td>
        </tr>
    </table>

<!--    <form method="post" action="/category2/add" enctype="multipart/form-data">-->
<!--        新增category<br>-->
<!--        序列号-->
<!--        <input type="text" name="productId" required><br>-->
<!--        种类-->
<!--        <input type="text" name="categoryId" th:value="${param.catid[0]}" readonly><br>-->
<!--&lt;!&ndash;        <input type="text" name="categoryId"><br>&ndash;&gt;-->
<!--        名字-->
<!--        <input type="text" name="name" required><br>-->
<!--        展示图片-->
<!--&lt;!&ndash;        <input type="file" name="page"><br>&ndash;&gt;-->
<!--        <input type="file" id="image" name="image" accept="image/*" required><br>-->
<!--        简介-->
<!--        <input type="text" name="description" required><br>-->
<!--        <input type="submit" name="添加产品">-->
<!--    </form>-->
</div>


<iframe th:replace="common/bottom.html" width="100%" frameborder="0" scrolling="yes" class="x-iframe"></iframe>
